// To parse this JSON data, do
//
//     final juBoHomeModel = juBoHomeModelFromJson(jsonString);

import 'dart:convert';

JuBoHomeModel juBoHomeModelFromJson(String str) => JuBoHomeModel.fromJson(json.decode(str));

String juBoHomeModelToJson(JuBoHomeModel data) => json.encode(data.toJson());

class JuBoHomeModel {
  D d;

  JuBoHomeModel({
    this.d,
  });

  factory JuBoHomeModel.fromJson(Map<String, dynamic> json) => JuBoHomeModel(
    d: D.fromJson(json["d"]),
  );

  Map<String, dynamic> toJson() => {
    "d": d.toJson(),
  };
}

class D {
  int errorCode;
  String msg;
  Result result;

  D({
    this.errorCode,
    this.msg,
    this.result,
  });

  factory D.fromJson(Map<String, dynamic> json) => D(
    errorCode: json["ErrorCode"],
    msg: json["Msg"],
    result: Result.fromJson(json["Result"]),
  );

  Map<String, dynamic> toJson() => {
    "ErrorCode": errorCode,
    "Msg": msg,
    "Result": result.toJson(),
  };
}

class Result {
  String type;
  List<Banner> navigationBar;
  List<Banner> bigNameMonopoly;
  List<Banner> projectBidding;
  List<Banner> juboInformation;
  List<Banner> friendDealer;
  List<Banner> banners;
  String version;

  Result({
    this.type,
    this.navigationBar,
    this.bigNameMonopoly,
    this.projectBidding,
    this.juboInformation,
    this.friendDealer,
    this.banners,
    this.version,
  });

  factory Result.fromJson(Map<String, dynamic> json) => Result(
    type: json["__type"],
    navigationBar: List<Banner>.from(json["NavigationBar"].map((x) => Banner.fromJson(x))),
    bigNameMonopoly: List<Banner>.from(json["BigNameMonopoly"].map((x) => Banner.fromJson(x))),
    projectBidding: List<Banner>.from(json["ProjectBidding"].map((x) => Banner.fromJson(x))),
    juboInformation: List<Banner>.from(json["JuboInformation"].map((x) => Banner.fromJson(x))),
    friendDealer: List<Banner>.from(json["FriendDealer"].map((x) => Banner.fromJson(x))),
    banners: List<Banner>.from(json["Banners"].map((x) => Banner.fromJson(x))),
    version: json["Version"],
  );

  Map<String, dynamic> toJson() => {
    "__type": type,
    "NavigationBar": List<dynamic>.from(navigationBar.map((x) => x.toJson())),
    "BigNameMonopoly": List<dynamic>.from(bigNameMonopoly.map((x) => x.toJson())),
    "ProjectBidding": List<dynamic>.from(projectBidding.map((x) => x.toJson())),
    "JuboInformation": List<dynamic>.from(juboInformation.map((x) => x.toJson())),
    "FriendDealer": List<dynamic>.from(friendDealer.map((x) => x.toJson())),
    "Banners": List<dynamic>.from(banners.map((x) => x.toJson())),
    "Version": version,
  };
}

class Banner {
  int id;
  String name;
  String link;
  String description;
  String image;
  int sort;
  dynamic parentId;
  int type;
  int jumpType;
  String jumpValue;
  List<Banner> child;

  Banner({
    this.id,
    this.name,
    this.link,
    this.description,
    this.image,
    this.sort,
    this.parentId,
    this.type,
    this.jumpType,
    this.jumpValue,
    this.child,
  });

  factory Banner.fromJson(Map<String, dynamic> json) => Banner(
    id: json["ID"],
    name: json["Name"],
    link: json["Link"],
    description: json["Description"] == null ? null : json["Description"],
    image: json["Image"],
    sort: json["Sort"],
    parentId: json["ParentId"],
    type: json["Type"],
    jumpType: json["JumpType"],
    jumpValue: json["JumpValue"] == null ? null : json["JumpValue"],
    child: json["Child"] == null ? null : List<Banner>.from(json["Child"].map((x) => Banner.fromJson(x))),
  );

  Map<String, dynamic> toJson() => {
    "ID": id,
    "Name": name,
    "Link": link,
    "Description": description == null ? null : description,
    "Image": image,
    "Sort": sort,
    "ParentId": parentId,
    "Type": type,
    "JumpType": jumpType,
    "JumpValue": jumpValue == null ? null : jumpValue,
    "Child": child == null ? null : List<dynamic>.from(child.map((x) => x.toJson())),
  };
}
